from enum import Enum
from typing import Union

from pydantic import BaseModel


class IDModelMixin(BaseModel):
    id: int


class Type(str,Enum):
    image = "image"
    url = "url"
    page = "page"


class Status(str,Enum):
    active = "active"
    inactive = "inactive"


class Create(BaseModel):
    ad_id: int
    title: Union[str, None]
    image_url: str
    link_url: Union[str, None]
    order: int
    type: Type
    status: Status


class Update(BaseModel):
    ad_id: int
    title: Union[str, None]
    image_url: str
    link_url: Union[str, None]
    order: int
    type: Type
    status: Status
